-#
-# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
-# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
-# Created By:
-# Maintained By:
-#
-extends 'layouts/_widget_box.haml'

-block widget_title
  Programs

-block widget_buttons
  .filter
    .row-fluid
      .span8
        %input.ui-corner-all.widgetsearch.clear-value{ 'type': 'text', 'placeholder': 'Search' }
      .span4
        %a.btn.btn-add.pull-right{ 'href': 'javascript://', 'data-toggle': 'modal-ajax-form', 'data-modal-reset': 'reset', 'data-form-target': 'refresh', 'data-modal-class': 'modal-wide', 'data-object-singular': 'Program', 'data-object-plural': 'programs' } 
          %i.grcicon-add
          %span.object-type Program

-block widget_help
  programs

-block widget_id
  programs_widget

-block widget_class
  programs

-set quick_result_programs = quick_result_programs if quick_result_programs else None
-set prefix = "qf" if quick_result_programs else "dash"

-from 'shared/_quick_find.haml' import tab

-block main
  .tabbable.tabs-left{ id : "{{ None if quick_result_programs is defined else \"quick_find_programs\" }}" }
    %ul.nav.nav-tabs{ style : "display:none"}
      =tab("Program", "Programs", "/search?s=&qr={0}".format(quick_result_business_objects), "", "programs")
    .tab-content
      .tab-pane{ id : "#{prefix}_programs" }
